package com.example.administrator.rxjavarxandroid_retrofit;

import android.app.Application;

import com.example.administrator.rxjavarxandroid_retrofit.reject.component.AppComponent;
import com.example.administrator.rxjavarxandroid_retrofit.reject.component.DaggerAppComponent;
import com.example.administrator.rxjavarxandroid_retrofit.reject.moudle.AppModule;

/**
 * Created by chenboge on 2016/12/18.
 */
public class App extends Application {

    public static AppComponent mAppComponent;

    public static App appContext;

    @Override
    public void onCreate() {
        super.onCreate();
        appContext = this;
        mAppComponent = DaggerAppComponent.builder().appModule(new AppModule(this)).build();
    }

    public static App getAppContext() {
        return appContext;
    }

    public static AppComponent getAppComponent() {
        return mAppComponent;
    }
}
